{{#extends @html/community/base.html}}

{{:title}}Члены сообщества{{/:title}}

{{:community_body}}

	{{@html/layout/layout_3_1.html column_one=@:column_one column_two=@:column_two}}

	{{:column_one}}
	{{!connect "theme/page/common.css"}}
	{{!connect "theme/page/users.css"}}
		{{?actions.community_edit.is_allowed == 1}}
	{{!connect "cpaint2.inc.js"}}
	{{!connect "community/members.js"}}
	{{!connect "community/membersView.js"}}
	<a href="{{/}}{{community.url}}/members/ajax" id="member_submit_url" class="hidden-"></a>
		{{/?}}
	<div class="page pg-users pg-common">
		<h3 class="title-">Члены сообщества</h3>
		<table class="list-">
			<tr class="head-">
				<th class="header-"><a href="{{sort_url_name|safe}}" title="Сортировать по имени пользователя" {{?order_by=='name'}}class="current-"{{/?}}>Имя пользователя</a> 
				{{?order_by=='name'}}
					{{@:order_arrow}}
					{{:order_arrow}}
						{{?order_direction=='asc'}}
						<img src="{{!static type='images' 'icons/arrow_up.gif'}}" class="arrow-" />
						{{?:}}
						<img src="{{!static type='images' 'icons/arrow_down.gif'}}" class="arrow-" />
						{{/?}}
					{{/:order_arrow}}
				{{/?}}
				</th>
				<th class="cstatus-"><a href="{{sort_url_status|safe}}" title="Сортировть по статусу в сообществе" {{?order_by=='status'}}class="current-"{{/?}}>Статус в сообществе</a>
				{{?order_by=='status'}}
					{{@:order_arrow}}
				{{/?}}
				</th>
				<th class="date-"><a href="{{sort_url_date|safe}}" title="Сортировать по дате регистрации" {{?order_by=='date'}}class="current-"{{/?}}>Дата регистрации</a>
				{{?order_by=='date'}}
					{{@:order_arrow}}
				{{/?}}
				</th>
			</tr>
			{{!for items do=@:member}}
			{{:member}}
			<tr class="item-">
				<td class="header-">
					<div class="avatar-"><a href="{{/}}{{community.url}}/members/{{*oid}}" title="Профиль пользователя"><img src="{{?*avatar}}{{/}}{{*avatar | link_to 'imagestorage' 'sm1'}}{{?:}}{{!static type='images' 'avatar-48x48.png'}}{{/?}}" alt="" /></a></div>
					<a href="{{/}}{{community.url}}/members/{{*oid}}" title="Профиль пользователя" class="service-user name-">{{*fullname}}</a>
					<div class="status-">{{*status}}</div>
				</td>
				<td class="cstatus-">
					{{?actions.community_edit.is_allowed == 1}}
					<input class="userid-" type="hidden" value="{{*oid}}"/>
					<select class="select-">
						{{!for roles as="role" do=@:role}}
						{{:role}}
						<option value="{{role.oid}}" {{?*role_oid == role.oid}}selected="selected"{{/?}}>{{@:rt title=role.title}}</option>
						{{/:role}}
						{{:rt title=='Moderator'}}модератор{{/:rt}}
						{{:rt title=='CommunityMember'}}член сообщества{{/:rt}}
						{{:rt}}{{title}}{{/:rt}}
					</select>
					<a href="#" class="exclude-">Исключить из сообщества</a>
					{{?:}}
					<strong>{{@:rt title=*role_title}}</strong>
					{{/?}}
				</td>
				<td class="date-">{{*join_date|date "%d %M %Y"}}</td>
			</tr>
			{{/:member}}
		</table>
		{{@html/view/pager.html}}
	</div>
	{{/:column_one}}
	
	{{:column_two}}
	<!--{{@html/widget/createbtn.html}}-->
		{{createbtn}}
		{{column_two}}
	{{/:column_two}}
	
{{/:community_body}}
